from common.http_request import HttpRequest


class Server(HttpRequest):

    # 获取胡润排行榜
    def hurun_rank_datas(self):
        res = self.request(
            url="https://www.hurun.net/zh-CN/Rank/HsRankDetailsList",
            method="GET",
            params={
                "num": "2TOP7QAC",
                "offset": "0",
                "limit": "20",
            }
        )
        return self.json(res)

    # 获取每经热榜
    def hot_rank_datas(self):
        res = self.request(
            url="https://www.nbd.com.cn/news-rank-nr-h5/rank_index/news",
            method="GET",
            params={}
        )
        return self.json(res)
